package com.syp.auth.service.business;

import javax.servlet.http.HttpServletResponse;

import com.syp.auth.export.common.GeneralAccessVo;
import com.syp.auth.export.common.GeneralUserVo;
import com.syp.auth.export.request.AppLogRequest;
import com.syp.auth.export.request.TokenVerifyRequest;
import com.syp.auth.export.response.AppLogResponse;

public interface AuthorizeServiceI {

	/**
	 * 开放登录
	 * 
	 * @param guser
	 * @param httpResponse
	 */
	public void dsignin(GeneralUserVo guser, GeneralAccessVo gaccess, HttpServletResponse httpResponse) throws UsernameOrPasswordUncheckException, NoSigninAuthenticationException;

	/**
	 * 验证sid是否有效
	 * 
	 * @param request
	 * @return
	 */
	public boolean verify(TokenVerifyRequest request);

	/**
	 * 图片验证码
	 * 
	 * @param sid
	 * @param httpResponse
	 */
	public void ivc(String sid, HttpServletResponse httpResponse);

	/**
	 * 退出登录
	 * 
	 * @param sid
	 */
	public void signout(String sid);

	/**
	 * 获取当前用户
	 * 
	 * @param sid
	 * @return
	 */
	public GeneralUserVo getCurrentUser(String sid);

	/**
	 * 权限记录日志
	 * 
	 * @param request
	 * @return
	 */
	public AppLogResponse log(AppLogRequest request);
}
